import React, { Component } from 'react';
import '../styles/List.css'

import pic from '../image/cat.jpg'
class List extends Component {
    state = {
        list: [
            { pic, text: "护肤" },
            { pic, text: "彩妆" },
            { pic, text: "香芬" },
            { pic, text: "进口酒" },
            { pic, text: "国产酒" },
            { pic, text: "精品奢货" },
            { pic, text: "食品百货" },
            { pic, text: "母婴专区" },
            { pic, text: "直播专区" },
            { pic, text: "特卖专场" }
        ]
    }
    render() {
        return (
            <div className='List'>
                {
                    this.state.list.map((item, index) => {
                        return (
                            <div className='item' key={index}>
                                <img src={ item.pic } />
                                <div className='text'>{ item.text} </div>
                            </div>
                        )
                    })
                }

            </div>
        );
    }
}

export default List;